Skip to content

Feat: stopping criteria for solvers#690

Merged
mrava87 merged 4 commits into
PyLops:devfrom
mrava87:feat-solversstopping
Aug 25, 2025
Merged

Feat: stopping criteria for solvers#690
mrava87 merged 4 commits into
PyLops:devfrom
mrava87:feat-solversstopping

Conversation

@mrava87
Copy link
Copy Markdown
Collaborator

@mrava87 mrava87 commented Aug 24, 2025

Motivation

PyLops's solvers tend to lack stopping criteria or have one/two simple stopping criterion directly implemented as part of the while statement in the run method (with one of them always being the max number of iterations).

This PR aims to introduce additional stopping criteria. However instead of adding them directly to the while statement , those are implemented as special callbacks with a stop member.

For the moment, only one of such stopping criterion is implemented based on the ratio between the initial and current residual norm or total cost function (ResidualNormCallback) and is added to all solvers that have a cost internal member tracking the history of the residual norm or total cost function.

Definition of done

  • Added new callback ResidualNormCallback and stopping auxiliary routine _callback_stop
  • Included callback based stopping criteria to basic and sparsity solvers
  • Added tests
  • Added documentation

@mrava87 mrava87 merged commit 0ae0af3 into PyLops:dev Aug 25, 2025
13 of 14 checks passed
@mrava87 mrava87 changed the title Feat: stopping criterial for solvers Feat: stopping criteria for solvers Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant